package top.roadvast.pdshopping.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author 郭泽鹏
 * @Date 2021/12/29 9:34
 * @Version 1.0
 * @Description 日志类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PdLog implements Serializable {
    private Long logId;

    //操作用户
    private Long userId;

    //日志级别：1代表info，2代表warning，3代表error
    private int level;

    //日志内容
    private String content;

    //创建时间
    //入参格式化
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //出参格式化
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date createTime;
}
